<?php

/*
 * CONTROLE FINANÇAS PESSOAIS
 *
 * Controle dos lançamentos de contas
 *
 * Histórico:
 *		v. 12/09/2011, EDGARD FANTINI JÚNIOR - efantinij@gmail.com
 *			- versão inicial
 *
 * FRAMWORK: edframe - Copyleft (cc) 2012 EDMAR Sistemas
 *
 */


class Vfinancas extends ClassGeral
{
		var $form ;

		/*
		 * metodo get_busca()
		 * apresenta os inputs para busca do objeto
		 */
		function get_busca()
		{
			$this->form[0]  = "<TABLE class='entrada'>" ;
			$this->form[0] .= "<caption> Consulta:</caption>" ;

			$this->form[0] .= "<TR>" ;
			$this->form[0] .= "<TD width='20%'>Mes do mes de referencia:</TD>" ;
			$this->form[0] .= "<TD>" ;
			$this->form[0] .= "<INPUT tipo='STR' label='Mes de referencia' size='6' ";
			$this->form[0] .= "maxlength='7' name='nome' onkeyup='mascara(this,mesAno)' />" ;
			$this->form[0] .= "</TD>" ;
			$this->form[0] .= "</TR>" ;

			$this->form[0] .= "</TABLE>" ;

/*
			$_Botoes = new MGeraBotoes ;
			$this->form[2] = $_Botoes->gerar("BUSCAR|acao|G|1#INCLUIR|acao|R|2") ;
*/
		}


		/*
		 * metodo get_edit()
		 * apresenta os inputs para edicao do objeto
		 */
		function get_edit()
		{
			if(!empty($this->sele))
			{
				$sit = retornaStatus($this->sele[0]->ativo) ;
				$this->form['ident'] = $this->sele[0]->op ;
			}
			else
				$this->form['ident'] = '' ;

			$this->form[0] = "<TABLE class='entrada'>" ;
			$this->form[0] .= "<CAPTION>EDI&Ccedil;&Atilde;O DE opera:</CAPTION>" ;
			$this->form[0] .= "<TR>" ;
			$this->form[0] .= "<TD colspan='4'>opera = ".$this->sele[0]->op ."</TD>" ;
			$this->form[0] .= "</TR>" ;

			$this->form[0] .= "<TR>" ;
			$this->form[0] .= "<TD width='20%'>mes da operacao:</TD>" ;
			$this->form[0] .= "<TD>" ;
			$this->form[0] .= "<INPUT tipo='' label='mes da operacao' ";
			$this->form[0] .= "size='20' maxlength='20' name='mesref' " ;
			$this->form[0] .= "value='".$this->sele[0]->mesref."' />" ;
			$this->form[0] .= "</TD>" ;
			$this->form[0] .= "</TR>" ;

			$this->form[0] .= "<TR>" ;
			$this->form[0] .= "<TD width='20%'>indicativo da conta (contas):</TD>" ;
			$this->form[0] .= "<TD>" ;
			$this->form[0] .= "<INPUT tipo='' label='indicativo da conta (contas)' ";
			$this->form[0] .= "size='20' maxlength='20' name='conta' " ;
			$this->form[0] .= "value='".$this->sele[0]->conta."' />" ;
			$this->form[0] .= "</TD>" ;
			$this->form[0] .= "</TR>" ;

			$this->form[0] .= "<TR>" ;
			$this->form[0] .= "<TD width='20%'>Data efetiva da transação:</TD>" ;
			$this->form[0] .= "<TD>" ;
			$this->form[0] .= "<INPUT tipo='STR' label='Data efetiva da transação' ";
			$this->form[0] .= "size='20' maxlength='20' name='dataefetiva' " ;
			$this->form[0] .= "value='".$this->sele[0]->dataefetiva."' />" ;
			$this->form[0] .= "</TD>" ;
			$this->form[0] .= "</TR>" ;

			$this->form[0] .= "<TR>" ;
			$this->form[0] .= "<TD width='20%'>historico, referencia:</TD>" ;
			$this->form[0] .= "<TD>" ;
			$this->form[0] .= "<INPUT tipo='STR' label='historico, referencia' ";
			$this->form[0] .= "size='20' maxlength='20' name='historico' " ;
			$this->form[0] .= "value='".$this->sele[0]->historico."' />" ;
			$this->form[0] .= "</TD>" ;
			$this->form[0] .= "</TR>" ;

			$this->form[0] .= "<TR>" ;
			$this->form[0] .= "<TD width='20%'>valor da operacao:</TD>" ;
			$this->form[0] .= "<TD>" ;
			$this->form[0] .= "<INPUT tipo='' label='valor da operacao' ";
			$this->form[0] .= "size='20' maxlength='20' name='valor' " ;
			$this->form[0] .= "value='".$this->sele[0]->valor."' />" ;
			$this->form[0] .= "</TD>" ;
			$this->form[0] .= "</TR>" ;

			$this->form[0] .= "<TR>" ;
			$this->form[0] .= "<TD width='20%'>Se operação de Crédito ou Débito:</TD>" ;
			$this->form[0] .= "<TD>" ;
			$this->form[0] .= "<INPUT tipo='STR' label='Se operação de Crédito ou Débito' ";
			$this->form[0] .= "size='20' maxlength='20' name='tipo' " ;
			$this->form[0] .= "value='".$this->sele[0]->tipo."' />" ;
			$this->form[0] .= "</TD>" ;
			$this->form[0] .= "</TR>" ;

			$this->form[0] .= "<TR>" ;
			$this->form[0] .= "<TD>SITUA&Ccedil;&Atilde;O:</TD>" ;
			$this->form[0] .= "<TD>" ;
			$this->form[0] .= "<INPUT type='radio' name='situacao' id='sitA' value='A' ".$sit['A']." />Ativo" ;
			$this->form[0] .= "<INPUT type='radio' name='situacao' id='sitI' value='I' ".$sit['I']." />Inativo" ;
			$this->form[0] .= "</TD>" ;
			$this->form[0] .= "</TR>" ;

			$this->form[0] .= "</TABLE>" ;

			$_Botoes = new MGeraBotoes ;
			$this->form[2] = $_Botoes->gerar("GRAVAR|acao|G|3#retornar|acao|R|0") ;
		}

		/*
		 * metodo get_selec()
		 * apresenta os inputs para selecao do objeto
		 */
/*
		function get_selec()
		{
			$this->form[0]  = "<TABLE class='entrada'>" ;
			$this->form[0] .= "<CAPTION id='capitionTab'>SELECIONE UMA CONTA</CAPTION>" ;
			$this->form[0] .= "<TR>" ;
			$this->form[0] .= "<TH>Sel.</TH>" ;
			$this->form[0] .= "<TH>CONTA</TH>" ;
			$this->form[0] .= "</TR>" ;

			$i = 0 ;
			foreach ($this->sele as $Sele)
			{
				$this->form[0] .= "<TR bgcolor='".set_cor($i)."'>" ;
				$this->form[0] .= "<TD width='5%'>" ;
				$this->form[0] .= "<INPUT type='radio' name='selec' onClick='acao(2," ;
				$this->form[0] .= $Sele->op ;
				$this->form[0] .= ")' />" ;
				$this->form[0] .= "</TD>" ;
				$this->form[0] .= "<TD>" ;
				$this->form[0] .= $Sele->historico ;
				$this->form[0] .= "</TD>" ;
				$i++ ;
			}
			$this->form[0] .= "</TABLE>";

			$_Botoes = new MGeraBotoes ;
			$this->form[2] = $_Botoes->gerar("Retornar|acao|R|0") ;
		}
*/

}
